package v3.object.space;

import text.TextUtil;


public class Enemy extends aSpaceObj
{
	
	private double sensorRfficency;
	private double attacProbability;
	private int sectorMaxDistanceJump;

	public Enemy()
	{
		super();
		shield=100.;
		hull=100.;
		alive=true;
		sensorRfficency=.5;
		attacProbability=.8;
		sectorMaxDistanceJump=8;
		this.spaceObjType = SpaceObjType.Enemy;
	}
	
	@Override
	public String getInfo()
	{
		return TextUtil.append(sectorPosition+" SHIELD: " + format_00.format(shield)," HULL: " + format_00.format(hull) ,(isAlive() ? "" : " -DESTROY- ") );
	}

	public double getSensorEfficency(int r)
	{
		return sensorRfficency/(double)r;
	}

	public double getAttacProbability()
	{
		// TODO Auto-generated method stub
		return attacProbability;
	}

	public int getSectorMaxDistanceJump()
	{
		return sectorMaxDistanceJump;
	}

	@Override
	public String getDescription()
	{
		return spaceObjType.toString();
	}

	@Override
	public void collision(iSpaceObj o)
	{
		// TODO Auto-generated method stub
		
	}
}
